﻿using System;
using System.Collections.Generic;
using System.Text;
using DTN.Core.Utilities;
using System.Data.SqlClient;
using System.Data;
namespace com.dtn.deals
{
	public class tbl_Product
	{
		private System.Int32 _ID;
		public System.Int32 ID
		{
			get { return this._ID; }		
			set { this._ID = value; }
		}
        //lưu ID của bảng TFrame
        private System.Int32 _FID;

        public System.Int32 FID
        {
            get { return _FID; }
            set { _FID = value; }
        }

		private System.Int32 _pId;
		public System.Int32 pId
		{
			get { return this._pId; }		
			set { this._pId = value; }
		}
		private System.Int32 _cityId;
		public System.Int32 cityId
		{
			get { return this._cityId; }		
			set { this._cityId = value; }
		}
		private System.String _proName;
		public System.String proName
		{
			get { return this._proName; }		
			set { this._proName = value; }
		}
		private System.String _contact;
		public System.String contact
		{
			get { return this._contact; }		
			set { this._contact = value; }
		}
		private System.String _saleOff;
        public System.String saleOff
		{
			get { return this._saleOff; }		
			set { this._saleOff = value; }
		}
		private System.Double _price;
		public System.Double price
		{
			get { return this._price; }		
			set { this._price = value; }
		}
		private System.Int32 _votes;
		public System.Int32 votes
		{
			get { return this._votes; }		
			set { this._votes = value; }
		}
		private System.Int32 _voteSet;
		public System.Int32 voteSet
		{
			get { return this._voteSet; }		
			set { this._voteSet = value; }
		}
		private System.String _promotion;
		public System.String promotion
		{
			get { return this._promotion; }		
			set { this._promotion = value; }
		}
		private System.Int32 _rank;
		public System.Int32 rank
		{
			get { return this._rank; }		
			set { this._rank = value; }
		}
		private System.String _poisition;
		public System.String poisition
		{
			get { return this._poisition; }		
			set { this._poisition = value; }
		}
		private System.String _Info;
		public System.String Info
		{
			get { return this._Info; }		
			set { this._Info = value; }
		}
		private System.String _timeFrame;
		public System.String timeFrame
		{
			get { return this._timeFrame; }		
			set { this._timeFrame = value; }
		}
		private System.DateTime _cDate;
		public System.DateTime cDate
		{
			get { return this._cDate; }		
			set { this._cDate = value; }
		}
		private System.DateTime _startDate;
		public System.DateTime startDate
		{
			get { return this._startDate; }		
			set { this._startDate = value; }
		}
		private System.DateTime _endDate;
		public System.DateTime endDate
		{
			get { return this._endDate; }		
			set { this._endDate = value; }
		}
		private System.Int32 _isDel;
		public System.Int32 isDel
		{
			get { return this._isDel; }		
			set { this._isDel = value; }
		}
		private System.String _cMember;
		public System.String cMember
		{
			get { return this._cMember; }		
			set { this._cMember = value; }
		}

        private System.String _cateID;

        public System.String CateID
        {
            get { return _cateID; }
            set { _cateID = value; }
        }
        //Id cho bảng timeframe
        private System.Int32 _parrent;

        public System.Int32 Parrent
        {
            get { return _parrent; }
            set { _parrent = value; }
        }
        private System.Int32 needUpdateFI;

        public System.Int32 NeedUpdateFI
        {
            get { return needUpdateFI; }
            set { needUpdateFI = value; }
        }
        private System.Int32 needInsertFI;

        public System.Int32 NeedInsertFI
        {
            get { return needInsertFI; }
            set { needInsertFI = value; }
        }
        
        

        private System.String _autoId;

        public System.String AutoId
        {
            get { return _autoId; }
            set { _autoId = value; }
        }

        private System.Int32 _stime;
        public System.Int32 STime
        {
            get { return _stime; }
            set { _stime = value; }
        }

        private System.Int32 _etime;
        public System.Int32 ETime
        {
            get { return _etime; }
            set { _etime = value; }
        }


        public tbl_Product()
        {
        }

        public tbl_Product(DataRow infodr)
		{
            ID = ConvertUtility.ToInt32(infodr["ID"]);
            CateID = ConvertUtility.ToString(infodr["cateId"]);
            pId = ConvertUtility.ToInt32(infodr["pId"]);
            cityId = ConvertUtility.ToInt32(infodr["cityId"]);
            proName = ConvertUtility.ToString(infodr["proName"]);
            contact = ConvertUtility.ToString(infodr["contact"]);
            saleOff = ConvertUtility.ToString(infodr["saleOff"]);
            price = ConvertUtility.ToDouble(infodr["price"]);
            votes = ConvertUtility.ToInt32(infodr["votes"]);
            voteSet = ConvertUtility.ToInt32(infodr["voteSet"]);
            promotion = ConvertUtility.ToString(infodr["promotion"]);
            rank = ConvertUtility.ToInt32(infodr["rank"]);
            poisition = ConvertUtility.ToString(infodr["poisition"]);
            _Info = ConvertUtility.ToString(infodr["Info"]);
            timeFrame = ConvertUtility.ToString(infodr["timeFrame"]);
            cDate = ConvertUtility.ToDateTime(infodr["cDate"]);
            startDate = ConvertUtility.ToDateTime(infodr["startDate"]);
            endDate = ConvertUtility.ToDateTime(infodr["endDate"]);
            isDel = ConvertUtility.ToInt32(infodr["IsDel"]);
            cMember = ConvertUtility.ToString(infodr["cMember"]);
            Parrent = ConvertUtility.ToInt32(infodr["Parrent"]);
            needUpdateFI = ConvertUtility.ToInt32(infodr["NeedUpdateFI"]);
            needInsertFI = ConvertUtility.ToInt32(infodr["NeedInsertFI"]);
            AutoId = ConvertUtility.ToString(infodr["AutoId"]);
            STime = Convert.ToInt32(infodr["stime"]);
            ETime = Convert.ToInt32(infodr["etime"]);
		}
        public tbl_Product(SqlDataReader dr)
		{
			ID = ConvertUtility.ToInt32(dr["ID"]);
			CateID = ConvertUtility.ToString(dr["cateId"]);
			pId = ConvertUtility.ToInt32(dr["pId"]);
			cityId = ConvertUtility.ToInt32(dr["cityId"]);
			proName = ConvertUtility.ToString(dr["proName"]);
			contact = ConvertUtility.ToString(dr["contact"]);
			saleOff = ConvertUtility.ToString(dr["saleOff"]);
			price = ConvertUtility.ToDouble(dr["price"]);
			votes = ConvertUtility.ToInt32(dr["votes"]);
			voteSet = ConvertUtility.ToInt32(dr["voteSet"]);
			promotion = ConvertUtility.ToString(dr["promotion"]);
			rank = ConvertUtility.ToInt32(dr["rank"]);
			poisition = ConvertUtility.ToString(dr["poisition"]);
			_Info = ConvertUtility.ToString(dr["Info"]);
			timeFrame = ConvertUtility.ToString(dr["timeFrame"]);
			cDate = ConvertUtility.ToDateTime(dr["cDate"]);
			startDate = ConvertUtility.ToDateTime(dr["startDate"]);
			endDate = ConvertUtility.ToDateTime(dr["endDate"]);
			isDel = ConvertUtility.ToInt32(dr["IsDel"]);
			cMember = ConvertUtility.ToString(dr["cMember"]);
			Parrent = ConvertUtility.ToInt32(dr["Parrent"]);
			needUpdateFI = ConvertUtility.ToInt32(dr["NeedUpdateFI"]);
			needInsertFI = ConvertUtility.ToInt32(dr["NeedInsertFI"]);
			AutoId = ConvertUtility.ToString(dr["AutoId"]);
            STime = Convert.ToInt32(dr["stime"]);
            ETime = Convert.ToInt32(dr["etime"]);
		}
        //
	}
}
